Conversation
pyproject.toml now carries the PEP 621 metadata setup.py declared, built with uv_build; dev tools move to a PEP 735 group and both pydantic lanes become conflicting groups, so every CI lane installs from the committed uv.lock. setup.py, requirements*.txt, MANIFEST.in, pytest.ini and the Makefile are gone; contributor docs move to CONTRIBUTING.md. CI installs with uv sync --locked; the publish job stamps the version with uv version, builds with uv build --no-sources on a checksum-verified uv, and keeps its build -> scan -> publish gating and PyPI token auth. The audit compiles its three trees from pyproject.toml with --no-sources and fails if the dev group did not resolve. uv is pinned once, by [tool.uv] required-version, with a 7-day exclude-newer cooldown; Dependabot uses the uv ecosystem and a uv-lock hook stops drift. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F6b4ERDYYZ8NRTv1zJYxx2
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear issue
PER-16221. Stacked on #126 (PER-16176); retarget to
mainonce #126 merges.Why
The SDK still packaged with
setup.pyandrequirements*.txt, installed with plain pip in CI and had no lockfile, so every CI run resolved a different tree. This is a pure migration: no SDK code changes and no tool upgrades. PER-16222 is the tooling-upgrade follow-up, stacked on this PR.What changed
pyproject.toml: PEP 621[project]metadata carries everythingsetup.pydeclared. It builds withuv_build, and the runtime ranges are unchanged.devgroup, pinned exactly at the versions CI installed before.ruffandmypymatch the pre-commit hook revs, which are what actually lint. The two pydantic lanes are conflicting groups (pydantic-v1,pydantic-v2), so both resolutions are locked inuv.lock.[tool.uv] required-version = "==0.12.18". setup-uv reads the same pin, and so does the uv-lock hook rev.exclude-newer = "7 days"keeps a manualuv lockfrom picking up just-published packages..python-version:3.11, matching CI, so local runs use the same Python.setup.py,requirements.txt,requirements-dev.txt,MANIFEST.in,pytest.iniand theMakefile. pytest config moves to pyproject's[tool.pytest].generate-modelswould regeneratemodels.pywith whatever generator was installed, and silently drop the file's hand-written pydantic v1/v2 compatibility header.CONTRIBUTING.mdnow documents a pinned, reproducible regeneration instead.CONTRIBUTING.md: new, with setup, offline vs e2e tests, both pydantic lanes, building and model regeneration. These dev instructions were kept out of the README, which is also the PyPI page. The README image now uses an absolute URL so it renders on PyPI.test.ymlrunsuv sync --locked --group <lane>, then a step that fails unless the installed pydantic major matches the lane. Job names are unchanged, so the required checks still match.pre-commit.ymlruns pre-commit from the lock, with a Python-aware hook cache.security.ymlandaudit-deps.shstill build the same three trees, now compiled frompyproject.tomlwith--no-sources. The dev tree now fails if thedevgroup didn't resolve.python-sdk-publish.ymlstamps the version withuv version --frozenfrom the validated tag, then builds withuv build --no-sourceson a checksum-verified uv. The build → scan → publish gating and thePYPI_TOKENauth are unchanged.uvecosystem, keeping the cooldowns, groups andversioning-strategy: increase. Auv-lockpre-commit hook stopspyproject.tomlanduv.lockfrom drifting apart.Published package
permit/files are identical to the setuptools build, and there is still notestspackage.Requires-Dist,Requires-Pythonand the classifiers are identical. The differences:License-Expression: Apache-2.0, PEP 639) plusLicense-File;Author-emailnow includes the author's name;Project-URLentries for Homepage, Documentation and Repository.tests/,setup.pyorrequirements.txt. uv_build always adds apyproject.toml.orignext to thepyproject.tomlit rewrites.Architectural changes
No architectural change.
How it was tested
uv lock --checkpasses, anduv sync --lockedworks on both lanes.bash .github/scripts/audit-deps.shwith Trivy: runtime-ceiling 18, runtime-floor 15 and dev-ceiling 43 packages, 0 vulnerabilities. The floor tree resolvesaiohttp==3.14.3,pydantic==1.10.13,loguru==0.7.0andtyping-extensions==4.5.0. The dev-group guard fails (exit 1) when pytest is missing.uv build --no-sources: wheel and sdist contents and METADATA were diffed against the pre-migration setuptools build; see above.actionlint,zizmor(0 findings),shellcheckandprek run --all-files, includinguv-lock.Manual test plan
uv self update 0.12.18), then runuv sync. Expect pydantic 2.x.uv sync --group pydantic-v1 && uv run python -c "import pydantic; print(pydantic.VERSION)". Expect 1.10.x.uv run pytest tests/test_offline_regressions.py. Expect all to pass.uv build, then check that the wheel contains onlypermit/and dist-info.pytest (Pydantic …)jobs should print the pydantic major they asserted.Blast radius and isolation
[tool.uv]table: it warns and ignores the whole table, including the version pin and the cooldown. CI'suv-lockhook catches the resulting lock drift.Scope and size
uv.lock.Deferred to PER-16222
pre-commitecosystem entry.py.typedand a Python 3.14 lane.🤖 Generated with Claude Code